package cn.sciento.starter.keyencrypt.mvc;

import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class EncryptArgParamResolverConfiguration implements WebMvcConfigurer {
  @Bean
  public EncryptServletModelAttributeMethodProcessor encryptMethodProcessor() {
    return new EncryptServletModelAttributeMethodProcessor();
  }
  
  public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
    argumentResolvers.add(encryptMethodProcessor());
  }
}
